﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Skyttespill
{
    public class DifficultyLevel
    {
        private Level[] levels;
        private Level easy, medium, professional, currentLevel;
        
        public DifficultyLevel() 
        {
            CreateLevels();
            levels = new Level[3];
            levels[0] = easy;
            levels[1] = medium;
            levels[2] = professional;
            currentLevel = levels[0];
        }

        private void CreateLevels() 
        {
            easy = new Level("easy", 800, 7, 30, 1);
            medium = new Level("medium", 500, 15, 25, 2);
            professional = new Level("professional", 100, 35, 20, 3);
        }

        public void SetLevel(int levelNum) 
        {
            currentLevel = levels[levelNum];
        }

        public Level GetLevel() 
        {
            return currentLevel;
        }
    }

    public struct Level 
    {
        public int threadSleep, targetAmount, targetSize, targetSpeed;
        public string levelName;

        /* Konstruktøren
         * threadSleep tilsvarer til drawLoopTarget, 
         * dvs definerer hvor ofte dukker opp nye måler
        */
        public Level(string levelName, int threadSleep, int targetAmount, int targetSize, int targetSpeed) 
        {
            this.levelName = levelName;
            this.threadSleep = threadSleep;
            this.targetAmount = targetAmount;
            this.targetSize = targetSize;
            this.targetSpeed = targetSpeed;
        }
    }
}
